package com.ebao.po.qa;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.ebao.constants.UserType;

/**
 * @desc 关注某问题
 * 
 * 会在通知中收到动态提醒
 * 
 * @author snow
 * @date 2012-7-10
 */
@Entity
@Table(name = "T_ConcernQA")
public class TConcernQA implements Serializable {

	private static final long serialVersionUID = -7008119026899425482L;
	
	private Long id;
	private UserType userType;		// 用户类型
	private String userId;			// 用户Id
	private TQuestion question;		// 关注的问题
	private String concernDate;		// 关注日期

	@Id
	@GeneratedValue
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public UserType getUserType() {
		return userType;
	}

	public void setUserType(UserType userType) {
		this.userType = userType;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	@Column(length = 18)
	public String getConcernDate() {
		return concernDate;
	}

	public void setConcernDate(String concernDate) {
		this.concernDate = concernDate;
	}

	@ManyToOne(optional = false, targetEntity = TQuestion.class)
	@JoinColumn(name = "question_id")
	public TQuestion getQuestion() {
		return question;
	}

	public void setQuestion(TQuestion question) {
		this.question = question;
	}

}
